home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-04 / bipl.zip / PROGS.ZIP / UNPACK.ICN < prev    next >
Text File  |  1992-09-28  |  853b  |  32 lines

  1. ############################################################################
  2. #
  3. #    File:     unpack.icn
  4. #
  5. #    Subject:  Program to unpackage files
  6. #
  7. #    Author:   Ralph E. Griswold
  8. #
  9. #    Date:     May 27, 1989
  10. #
  11. ###########################################################################
  12. #
  13. #     This program unpackages files produced by pack.icn.  See that program
  14. #  for information about limitations.
  15. #
  16. ############################################################################
  17. #
  18. #  See also:  pack.icn
  19. #
  20. ############################################################################
  21.  
  22. procedure main()
  23.    local line, out
  24.    while line := read() do {
  25.       if line == "##########" then {
  26.          close(\out)
  27.          out := open(name := read(),"w") | stop("cannot open ",name)
  28.          }
  29.       else write(out,line)
  30.       }
  31. end
  32.